//
//  KABillListModel.swift
//  kano
//
//  Created by Frank on 2024/9/19.
//

import KakaJSON


struct KARecordSubLoans: Convertible {
    var id: Int = 0
    var gid: String = ""
    var createTime: TimeInterval = 0
    var updateTime: TimeInterval = 0
    var userGid: String = ""
    var recordLoanGid: String = ""
    var forwardNumber: Int = 0
    var forwardAmount: Int = 0
    var subLoanRate: Int = 0
    var voucherAmount: Int = 0
    var forwardPayableFee: Int = 0
    var forwardFee: Int = 0
    var forwardLeftAmount: Double = 0.00
    var overdueFee: Int = 0
    var dueTime: TimeInterval = 0
    var repaymentAmount: Int = 0
    var lastRepaymentTime: TimeInterval = 0
    var repaymentStatus: Int = 0
    var dosettleFeeTime: TimeInterval = 0
    var isOverdue: Bool = false
    var remark: String = ""
    var exceedDays: Int = 0
}

struct KALoanListModel: Convertible {
    //loanGid 账单id
    var loanGid: String = ""
    //bankShortName 银行名称
    var bankShortName: String = ""
    //cardNo 卡号
    var cardNo: String = ""
    //exceedDays 逾期天数
    var exceedDays: Int = 0
    //loanLeftAmount 小额待还金额
    var loanLeftAmount: Double = 0.00
    //dueTime 到期时间
    var dueTime: TimeInterval = 0
    //status 0：打款中，2：还款处理中--7/20续期中，9：审核中, 8：因网络原因借款失败 99：因没有获取到绑卡token而借款失败,   1、4 ：待还款
    var status: Int = 0
    //productType 产品类型：1、14天小额 2、大额
    var productType: Int = 0
    //subLoanCount 分期数量
    var subLoanCount: Int = 0
    //贷款金额 loanAmount
    var loanAmount: Int = 0
    //tadpoleLoanFlag 是否是蝌蚪贷订单
    var tadpoleLoanFlag: Bool = false
    //tadpoleLoanLeftAmount 蝌蚪贷 待还金额
    var tadpoleLoanLeftAmount: Double = 0.00
    //recordSubLoans
    var recordSubLoans : [KARecordSubLoans]?
    
    var deductionGid: String = ""
    var canRenew: Bool = false
    var loanType: Int = 0
    var loanChannel: Int = 0
    var refundingStatus: Int = 0
    var delayTransferTime: TimeInterval = 0
    var uploadCertificateState: String = ""
    var applyTime: TimeInterval = 0
    var processingAmount: Int = 0
    var invalidTime: Int = 0
    var renewExpiredTime: Int = 0
    var subLoanNum: Int = 0
    var cardGid: String = ""
    var selectedLoanUseGid: String = ""
    var selectedPeriod: String = ""
    var selectedVoucher: String = ""

}

struct KABillListModel: Convertible {
    //creditLine 授信额度
    var creditLine : Int = 0
    //canBorrowAmount 当前可借额度
    var canBorrowAmount : Int = 0
    //unRepaidTotal 未还总额
    var unRepaidTotal : Double = 0.00
    //unRepayCount 几个未支付账单
    var unRepayCount : Int = 0
    //loanList 账单列表数组
    var loanList: [KALoanListModel]?
    
    var overdueAmount: Int = 0
    var undueAmount: Int = 0
    var overdueCnt: Int = 0
    var currentTime: Int = 0
    var repaymentTips: String = ""
    var isShowUploadCertificate: String = ""
    var compensateList: String = ""

    
}
